package com.dayuanit.dy15.ebook.bookshop.mapper;

import com.dayuanit.dy15.ebook.bookshop.domain.OrderDomain;
import com.dayuanit.dy15.ebook.bookshop.entity.Order;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    int updateStatus(@Param("orderId") Long orderId,
                     @Param("oldStatus") Integer oldStatus,
                     @Param("newStatus") Integer newStatus);

    List<Order> listOrder(Long userId);

    List<OrderDomain> listOrderInfos(Long userId);

}